import upload from '@/utils/upload'
import request from '@/utils/request'

// 用户密码重置
export function updateUserPwd(oldPassword, newPassword) {
	const data = {
		oldPassword,
		newPassword
	}
	return request({
		url: '/system/user/profile/updatePwd',
		method: 'put',
		params: data
	})
}

// 查询某日值班医生列表
export function findByTime(arTime, dSection) {
	return request({
		url: 'arrange/findByTime?arTime=' + arTime + '&dSection=' + dSection,
		method: 'get'
	})
}

// 挂号时间段
/**
 * @param {Object} data
 * id + orderDate
 */
export function findOrderTime(data) {
	return request({
		url: 'order/findOrderTime?arId=' + data,
		method: 'get',
	})
}

// 挂号
export function addOrder(data) {
	return request({
		url: 'patient/addOrder',
		method: 'get',
		params: data
	})
}

// 挂号
export function findOrderByPid(pid) {
	return request({
		url: 'patient/findOrderByPid?pId='+pid,
		method: 'get'
	})
}


// 挂号
export function findBedByPid(pid) {
	return request({
		url: 'bed/findBedByPid?pId='+pid,
		method: 'get'
	})
}


export function findOrderByDidApp(data) {
	return request({
		url: 'admin/findAllOrders',
		method: 'post',
		params:data
	})
}